(function(){
	pos = 0;
	ticking = false;
	var header = document.querySelector(".header");
	window.addEventListener("scroll", function(e){
		pos = window.scrollY;
		if(pos > 2 && !ticking){
            $('header').addClass("head");
            $('header>p').addClass('p');
			ticking = true;
		}
		if(pos < 2 && ticking){
            $('header').removeClass('head');
            $('header>p').removeClass('p');
			ticking = false;
		}
	});
})();
$.ajax({
    type:'GET',
    url:'json/index.json',
    success:function(date){
        var str = template('temp-test',{arr:date});
        $('.small').html(str);
    }
})




